Page({
    data:{
        klist:[]
    },
    onLoad(){

        wx.cloud.database().collection('knowledge')
        .orderBy('_createTime','desc')
        .get()
        .then(res => {
            console.log('successKnowledge',res)
            this.setData({
              klist : res.data
            })
        }).catch(err => {
            console.log('errorKnowledge',err)
        })
    },
    goDetail(e){
        wx.navigateTo({
          url: '/pages/knowledgeDetail/knowledgeDetail?id='+e.currentTarget.dataset.id
        })
    }

})